package fr.vahren.dotastrat.gui;

import com.trolltech.qt.gui.QGridLayout;
import com.trolltech.qt.gui.QPushButton;
import com.trolltech.qt.gui.QWidget;

import fr.vahren.dotastrat.Main;

public class D2SActionButtonsWidget extends QWidget {

	private QPushButton start;
	private QPushButton atk;
	private QPushButton move;
	private QPushButton end;
	private QPushButton info;

	public D2SActionButtonsWidget() {

		QGridLayout gridLayout = new QGridLayout();
		setLayout(gridLayout);
		start = new QPushButton("Start");
		gridLayout.addWidget(start, 0, 0);
		end = new QPushButton("End");
		gridLayout.addWidget(end, 0, 1);
		move = new QPushButton("Move");
		gridLayout.addWidget(move, 1, 0);
		atk = new QPushButton("Attack");
		gridLayout.addWidget(atk, 1, 1);
		info = new QPushButton("Info");
		gridLayout.addWidget(info, 2, 0, 1, 2);

		// actions
		start.clicked.connect(this, "start(boolean)");
		end.clicked.connect(this, "end(boolean)");
		move.clicked.connect(this, "move(boolean)");
		atk.clicked.connect(this, "atk(boolean)");
		info.clicked.connect(this, "info(boolean)");

	}

	public void start(boolean b) {
		Main.getWindow().start(b);
	}

	public void end(boolean b) {
		Main.getWindow().end(b);
	}

	public void atk(boolean b) {
		Main.getWindow().atk(b);
	}

	public void move(boolean b) {
		Main.getWindow().move(b);
	}

	public void info(boolean b) {
		Main.getWindow().info(b);
	}

}
